Dynomotion

Group: DynoMotion Message: 10517 From: geraldft Date: 11/18/2014
Subject: Problem running VB.net examples
HI

I thought I'd revisit the .net approach bu still can't get vb .net example to run.  This has been previously discussed but I haven't seen a solution.  I am using VS 2008.  I loaded and compiled the KMotion_dotNet.csproj in Kmotion\Kmotion_dotnet folder.  This creates the files in the Kmotion\debug directory ok.. 

Then I load the DynoMotion VB.net.sln in PC VB .examples\Dynomotion VB.net folder

I first have to set the reference path for KMotion_dotnet.  I used the kmotion\debug folder since this has the newly built files.  It is accepted - next I checked under compile and set the project to X86 which assigns output folder to ..\..\..\KMotion\Debug\  Now I am allowed to build the project.

But run the program?  No - still the "Invalid Operation Exception" which suggests it could not load Kmotion_dotnet or one of its dependencies - an attempt was made to load a program with an incorrect format.

My research suggests this may be to be with problems re 64 bit vs 32 bit.  My laptop is running 64 bit Windows 7.  Normally telling VS to build for X86 will make things work, but I really can't solve this one...

Tom or anyone - is there a solution?  Thanks Gerald


Group: DynoMotion Message: 10518 From: Tom Kerekes Date: 11/18/2014
Subject: Re: Problem running VB.net examples
Hi Gerald,

Try re-building all the Debug libraries by loading the solution BuildAllLibs.sln (which will build KMotion_dotNET library and all its dependencies).

You might also load the solution \PC VC Examples\BuildExamples\BuildExamples.sln which will build all of the examples including Dynomotion VB.net example
What Version of KMotion are you using?

Regards
TK



Group: DynoMotion Message: 10520 From: geraldft Date: 11/18/2014
Subject: Re: Problem running VB.net examples
Hi Tom

Thanks for the quick reply.  I have run the Build Examples in PC VC Examples.  Mysteriously the VB example does work from this project.  I just have to point it to the .exe in the VB Bin Debug folder.  But it only works when built from this PC VC Build Examples project.

It will not run if built after only loading the VB project.

I am on 4.33j at present but have tried several versions - all the same result...  Thanks Gerald
Group: DynoMotion Message: 10521 From: Sam Marrocco Date: 11/19/2014
Subject: Re: Problem running VB.net examples

On 11/18/2014 8:08 PM, geraldoft@... [DynoMotion] wrote:
 

HI

I thought I'd revisit the .net approach bu still can't get vb .net example to run.  This has been previously discussed but I haven't seen a solution.  I am using VS 2008.  I loaded and compiled the KMotion_dotNet.csproj in Kmotion\Kmotion_dotnet folder.  This creates the files in the Kmotion\debug directory ok.. 

Then I load the DynoMotion VB.net.sln in PC VB .examples\Dynomotion VB.net folder

I first have to set the reference path for KMotion_dotnet.  I used the kmotion\debug folder since this has the newly built files.  It is accepted - next I checked under compile and set the project to X86 which assigns output folder to ..\..\..\KMotion\Debug\  Now I am allowed to build the project.

But run the program?  No - still the "Invalid Operation Exception" which suggests it could not load Kmotion_dotnet or one of its dependencies - an attempt was made to load a program with an incorrect format.

My research suggests this may be to be with problems re 64 bit vs 32 bit.  My laptop is running 64 bit Windows 7.  Normally telling VS to build for X86 will make things work, but I really can't solve this one...

Tom or anyone - is there a solution?  Thanks Gerald




Gerald,
I spent quite a bit of time trying to determine all the dotnet/kflop dependencies because I did not want to have to keep my executables within the KMotion install directories. In the end I was able to "break out" the required requisite files for a vb.net/ KMotion dotnet application to function.

Read this thread
https://groups.yahoo.com/neo/groups/DynoMotion/conversations/topics/9639
from start to finish. Tom was very patient as he suggested keeping my app within the KMotion-expected directory structure and I pushed against that concept in favor of keeping my app independent of the KFlop installation structure. In the end I was able to make it happen after determining every dependency (all of which are listed in that forum thread near the end). Have a read and I'm sure you'll be able to get all the info you need to make it happen. The final result is that you do *not* need to keep your code in the KFlop installation folders. It just takes a bit of setup. This also lets you keep versions of your code that are independent of updates you may make to the KFlop's code base. At the end of the thread I summarized my successful method.

I also found it educational to try to separate out the example code in the KFlop's installation folder when I was experimenting. Moving pieces of individual example code out into their own folders is a great test for determining dependencies.



sam marrocco | chief technical officer
ringside.cutters.picnic.moonlink

248 548 2500 w
248 910 3344 c

ringsidecreative.com

Group: DynoMotion Message: 10522 From: Tom Kerekes Date: 11/19/2014
Subject: Re: Problem running VB.net examples
Hi Gerald,

I built the BuildAllLibs.sln in Debug Configuration.

I opened DynoMotion VB.net.sln

Added the Reference to KMotion_dotNet.dll in the KMotion\Debug Directory

Changed the Build Output Path to C:\KMotion433j\KMotion\Debug\

Built it and it ran for me. I tested on a W7 32-bit system.

HTH
Regards
TK

Group: DynoMotion Message: 11768 From: geraldft Date: 6/24/2015
Subject: Re: Problem running VB.net examples
Hi Tom

Trust me - I have tried everything with this example but it will not run. 

Have you tested it yourself with Win7 64 bit? 

That seems to be the only difference in setups and possibly what might cause a problem?

Thanks Gerald
Group: DynoMotion Message: 11771 From: Tom Kerekes Date: 6/24/2015
Subject: Re: Problem running VB.net examples
Hi Gerald,

I thought your previous email stated that the VB example runs fine if built from the BuildAllExamples Solution?

Regards
TK

Group: DynoMotion Message: 11775 From: geraldft Date: 6/24/2015
Subject: Re: Problem running VB.net examples
Hi Tom.  That was a while ago, but I was never able to get it to work standalone outside of that particular environment.  VB_Link by contrast works easily and I really prefer to continue using it.  Right now I just want to get this Flash Updater going...  Have you considered why it might still not be working?

Thanks G
Group: DynoMotion Message: 11781 From: Tom Kerekes Date: 6/25/2015
Subject: Re: Problem running VB.net examples
Hi Gerald,

I just tried running the V4.33l Dynomotion VB.net Example on a W7 64-bit system and it seems to run fine.  I just Built BuildAllLibs.sln using VS2008 in Debug Configuration.  The Built BuildAllExamples.sln using VS2008  in Debug Configuration.  Then ran Dynomotion VM.net.

Maybe your missing .NET 3.5 on your computer?

Regards
TK

Group: DynoMotion Message: 11834 From: geraldft Date: 7/1/2015
Subject: Re: Problem running VB.net examples
Yes - I have done that too, and the .exe files run.  But if I try to run the DynoMotion VB.net.sln from it's own folder it doesn't run.  Trying to work out the dependencies to create a standalone program is not clear.  If you could create one and include it, then that would be very helpful..        G
Group: DynoMotion Message: 11839 From: Sam Marrocco Date: 7/1/2015
Subject: Re: Problem running VB.net examples




On Jul 1, 2015, at 11:21 AM, geraldoft@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Yes - I have done that too, and the .exe files run.  But if I try to run the DynoMotion VB.net.sln from it's own folder it doesn't run.  Trying to work out the dependencies to create a standalone program is not clear.  If you could create one and include it, then that would be very helpful..        


There are postings I made to this news list several months ago that detail the process of setting up a standalone vb.net application that used the kflop. If you do a search you should find a detailed step by step process that is proven that I now use for all my standalone vb.net kflop apps. It lists and explains all the dependencies I found based on Tom K's useful feedback.

sam marrocco | chief technical officer
ringside.cutters.flavor.picnic.moonlink

248 548 2500 w
248 910 3344 c

ringsidecreative.com

Group: DynoMotion Message: 11840 From: geraldft Date: 7/1/2015
Subject: Re: Problem running VB.net examples
Hi Sam

I looked for that before but it was hidden.  As I now discover - if I select to "show message history" on your post then it appears.  I do find this Yahoo board a bit obscure to navigate at times I'm afraid... 

Even so - I think it would be nice if the Kmotion install included a working directory for VB.net, instead of having to go through all these convolutions...?  ;)
Group: DynoMotion Message: 11841 From: Sam Marrocco Date: 7/1/2015
Subject: Re: Problem running VB.net examples
> On Jul 1, 2015, at 3:09 PM, geraldoft@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
>
> Hi Sam
>
> I looked for that before but it was hidden. As I now discover - if I select to "show message history" on your post then it appears. I do find this Yahoo board a bit obscure to navigate at times I'm afraid...
>
> Even so - I think it would be nice if the Kmotion install included a working directory for VB.net, instead of having to go through all these convolutions...? ;)


Yes, yahoo lists, like everything's hat came after Usenet newsgroups do absolutely nothing to improve their lackluster experience over time.

Dynomotion had their reasons for the way they set up their projects, not the least of which I would surmise, is legacy. I agree that it would be nice if the project solution structure was set up differently than it is, but I'm certain everyone would have a different vision for that than mine (or yours). At least, with tom's help, I was able to understand the dependencies, and from that, derive my own base project skeleton framework. Once you use mine (or your own) based on that, it should be trivial to update your projects when new versions of the kflop dotnet libraries are released.

sam marrocco | chief technical officer
ringside.cutters.flavor.picnic.moonlink

248 548 2500 w
248 910 3344 c

ringsidecreative.com

<http://ringsidecreative.com/>
Group: DynoMotion Message: 11849 From: himykabibble Date: 7/1/2015
Subject: Re: Problem running VB.net examples
FWIW - A few years ago, I did a CNC controller application in c# using VS2008.  Getting everything working under VS2008 wirh dotNet was a bit of a chore, especially getting .NET 4.0 installed and working.  I recently started a new app using VS 2013 Community, and getting dotNet working was absolutely quick and painless.  You might consider updating to VS2013 Community - it's free, and works very well (except for the hideous new UI....).

Regards,
Ray L.
Group: DynoMotion Message: 12520 From: bozemangeek Date: 11/15/2015
Subject: Re: Problem running VB.net examples

After wading through this long thread, I am rather discouraged.  I have never seen a commercial product with examples that are so obsolete and difficult to compile.  It is not clear that Visual Studio 2008 is even available as a legacy product any more. 


My attempt to convert/compile "DynoMotion VB.net" using VS2010 Express failed with the message:

     Could not load file or assembly 'KMotion_dotNet, Version=1.0.1.0,

     An attempt was made to load a program with an incorrect format.


In a previous post, himykabibble reports success using VS2013 Community. This sounds encouraging but there are no details and it is hard to believe there are no tricks.


I would greatly appreciate help in setting up a  KMotion-based VB.NET project  in an independent directory using a recent version of VS. Preferably an Express or Community version. 


Can anyone provide a minimal example project like this?  This seems like something Dynomotion should do for their customers since they claim, on their web site: Write custom software to run KFLOP with our .NET libraries. 




Group: DynoMotion Message: 12521 From: Hardy Family Date: 11/15/2015
Subject: Re: Problem running VB.net examples
VS2013 works for me, but yes there are a few tricks.  I'm kinda busy right now, but if you search the group archive there are some details on getting this to work.  Tom has been very responsive to support for this version of VS.  For example, there is a version of KMotion.exe compiled with VS2013 so everything can use the latest DLLs.  I can't advise on VB or .net since I don't use those.

Regards,
SJH


On Sun, Nov 15, 2015 at 4:02 PM, simmonds.michael@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

After wading through this long thread, I am rather discouraged.  I have never seen a commercial product with examples that are so obsolete and difficult to compile.  It is not clear that Visual Studio 2008 is even available as a legacy product any more. 


My attempt to convert/compile "DynoMotion VB.net" using VS2010 Express failed with the message:

     Could not load file or assembly 'KMotion_dotNet, Version=1.0.1.0,

     An attempt was made to load a program with an incorrect format.


In a previous post, himykabibble reports success using VS2013 Community. This sounds encouraging but there are no details and it is hard to believe there are no tricks.


I would greatly appreciate help in setting up a  KMotion-based VB.NET project  in an independent directory using a recent version of VS. Preferably an Express or Community version. 


Can anyone provide a minimal example project like this?  This seems like something Dynomotion should do for their customers since they claim, on their web site: Write custom software to run KFLOP with our .NET libraries. 





Group: DynoMotion Message: 12525 From: Moray Cuthill Date: 11/16/2015
Subject: Re: Problem running VB.net examples
My post about how I got it working with VS Community 2013 is at https://groups.yahoo.com/neo/groups/DynoMotion/conversations/messages/11669

It also includes a link to Troy's original pdf, with my post containing the slight differences I found. I think some were due to Tom removing some deprecated bits in later versions of KMotion, and some possibly due to me using a slightly newer version of VS Community 2013.
I've never got any further than being able to run the examples, as other jobs have got in the way, but I did manage to compile and run the examples.

Moray

On Mon, Nov 16, 2015 at 12:21 AM, Hardy Family hardy.woodland.cypress@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

VS2013 works for me, but yes there are a few tricks.  I'm kinda busy right now, but if you search the group archive there are some details on getting this to work.  Tom has been very responsive to support for this version of VS.  For example, there is a version of KMotion.exe compiled with VS2013 so everything can use the latest DLLs.  I can't advise on VB or .net since I don't use those.

Regards,
SJH


On Sun, Nov 15, 2015 at 4:02 PM, simmonds.michael@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

After wading through this long thread, I am rather discouraged.  I have never seen a commercial product with examples that are so obsolete and difficult to compile.  It is not clear that Visual Studio 2008 is even available as a legacy product any more. 


My attempt to convert/compile "DynoMotion VB.net" using VS2010 Express failed with the message:

     Could not load file or assembly 'KMotion_dotNet, Version=1.0.1.0,

     An attempt was made to load a program with an incorrect format.


In a previous post, himykabibble reports success using VS2013 Community. This sounds encouraging but there are no details and it is hard to believe there are no tricks.


I would greatly appreciate help in setting up a  KMotion-based VB.NET project  in an independent directory using a recent version of VS. Preferably an Express or Community version. 


Can anyone provide a minimal example project like this?  This seems like something Dynomotion should do for their customers since they claim, on their web site: Write custom software to run KFLOP with our .NET libraries. 






Group: DynoMotion Message: 12527 From: bozemangeek Date: 11/16/2015
Subject: Re: Problem running VB.net examples

Hi Moray,


Thanks for the reference, however the link to Troy's PDF appears to be broken:


Or perhaps I do not understand how to use Yahoo Groups. Their UI is astonishingly opaque.


Mike

Group: DynoMotion Message: 12528 From: TK Date: 11/17/2015
Subject: Re: Problem running VB.net examples
Hi Mike,

Try searching the files section for "Community".

Regards
TK

On 11/16/2015 11:03 PM, simmonds.michael@... [DynoMotion] wrote:
 

Hi Moray,


Thanks for the reference, however the link to Troy's PDF appears to be broken:


Or perhaps I do not understand how to use Yahoo Groups. Their UI is astonishingly opaque.


Mike


Group: DynoMotion Message: 12529 From: Moray Cuthill Date: 11/17/2015
Subject: Re: Problem running VB.net examples
Looks like yahoo played around with urls again.

If you find the files section on the Yahoo site, look for the directory "KMotionCNC Screen Customizing" created by tmday7, and the pdf you need is "Setup VisualStudio Community 2013"


Moray

On Tue, Nov 17, 2015 at 4:29 PM, TK tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hi Mike,

Try searching the files section for "Community".

Regards
TK

On 11/16/2015 11:03 PM, simmonds.michael@... [DynoMotion] wrote:
 

Hi Moray,


Thanks for the reference, however the link to Troy's PDF appears to be broken:


Or perhaps I do not understand how to use Yahoo Groups. Their UI is astonishingly opaque.


Mike



Group: DynoMotion Message: 12530 From: bozemangeek Date: 11/17/2015
Subject: Re: Problem running VB.net examples
Thanks guys.  That worked.
Group: DynoMotion Message: 12539 From: bozemangeek Date: 11/18/2015
Subject: Re: Problem running VB.net examples

I have tried to carefully follow instructions from several group members for compiling VB.net examples but nothing I compile runs correctly.


I can compile Jogger.NET as Debug for x86 target without errors, but running it immediately produces the error:   Unable to load DLL 'KMViaVB:  The specified module could not be found.


KMViaVB.dll  is located in the directory with KMotion_dotnet.dll and that DLL is referenced in the project.  I also tried copying the KMViaVB.dll into the Debug directory with my executable.  It is still not found.


How do I tell the application where to find this DLL?



Group: DynoMotion Message: 12540 From: Marrocco, Sam Date: 11/18/2015
Subject: Re: Problem running VB.net examples


On 11/18/2015 2:09 PM, simmonds.michael@... [DynoMotion] wrote:
 

I have tried to carefully follow instructions from several group members for compiling VB.net examples but nothing I compile runs correctly.




Michael,
I'm not certain if this is what you were reading but take a look at this thread from start to finish....
https://groups.yahoo.com/neo/groups/DynoMotion/conversations/topics/9639
I know the technique works because I came up with it and use it often. It will help you understand the existing components.

It documents my methods for using the kflop and dotnet libraries. It took a while but with Tom's help I learned the reasons my dotnet code was not working and it helped me develop a code skeleton that I now use for all my kflop apps. Once you get all of that down you can start developing your own apps without having to keep everything on the existing kmotion folder structures. I wouldn't worry too much about trying to recompile the existing kmotion apps...I took them as more for referencing the source code than anything else. Once you've unlinked yourself from the existing KMotion install folders I think you will find it much easier to maintain your code.

Hope that helps to ease the learning curve.

sam marrocco | chief technical officer
ringside.cutters.flavor.picnic.moonlink

248 548 2500 w
248 910 3344 c

ringsidecreative.com